package 创建者模式.工厂模式.工厂方法模式;

public class Client {
    public static void main(String[] args) {
        CoffeeStore store=new CoffeeStore();
        CoffeeFactory factory=new AmericanCoffeeFactory();
        store.setFactory(factory);
        Coffee coffee=store.orderCoffee();
        System.out.println(coffee.getName());
    }
}
